package com.example.mymusic.app;

import android.app.Application;
import android.app.StartForegroundCalledOnStoppedServiceException;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
import android.os.Looper;

import com.example.mymusic.MainActivity;
import com.example.mymusic.utils.Comm;

public class MyApp extends Application {

    private static MyApp Instance;
    public static MyApp getInstance() {
        return Instance;
    }
    private static Handler mainHandler = new Handler(Looper.getMainLooper());
    public static Handler getMainHandler() {
        return mainHandler;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Instance=this;
        Comm.put(Comm.FlagKey,2);

        // 启动前台service
//        Intent intent = new Intent(this, ForegroundService.class);
//        startService(intent);
    }
}
